<template>
	<view class="contentBox auto m-top30" v-if="infoData">
		<headline :title="infoData.name"></headline>
		<view class="row f-column m-top30 boxshow bor_radius_10" 
		    v-for="(item,index) in infoData.list" :key="item.sid" 
			 @click="$toPath(`/answer/answer/answer?act_id=${item.act_id}&gid=${item.gid}`);">
			<image :src="$imgUrls(item.wx_img)" mode="aspectFill" class="listImg"></image>
			<view class="padding20-24">
				<text class="ellipsis color_1A size32">{{item.wx_title}}</text>
				<view class="row j-sb a-center m-top40">
					<text class="color_AB h6">{{item.create_time}}</text>
					<view class="d-flex a-center">
						<text class="color_66 h6">共</text>
						<text class="color_E6 h6 bold">{{item.people_count}}</text>
						<text class="color_66 h6">人学习</text>
					</view>
				</view>
			</view>
		</view>
		
	</view>
</template>

<script>
	import headline from '@/components/home/headline.vue'
	export default {
		name:"practice",
		props:['pageData'],
		components:{
			headline
		},
		data() {
			return {
				infoData:'',
			};
		},
		mounted() {
			this.getBlockInfo();
		},
		methods: {
			async getBlockInfo(){
				const pageData = this.pageData;
				const result = await this.$getBlockInfo(pageData.list);
				
				if(!result.list.length || !result.list[0].list.length) return;
				this.infoData = result.list[0];
				
			}
			
		},
	}
</script>

<style lang="scss" scoped>
	.contentBox{
		width:674rpx;
	}
	.listImg{
		width:100%;
		height: 312rpx;
	}
</style>